package com.fred.controller;


import com.fred.service.UserService;
import com.fred.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fred
 * @since 2024-12-06
 */
@RestController
@RequestMapping("/api/user")
@Slf4j
public class UserController {
    @Resource
    private UserService userService;
    @GetMapping("/listAll")
    public Result listAll(){
        return Result.ok(userService.list());
    }

}

